export default {
  data() {
    return {
      // 获取员工列表
      adminList: [],
      adminLoading: false
    }
  },
  methods: {
    // 获取获取员工列表
    async getAdminList(query = {}, callback) {
      this.adminLoading = true
      try {
        const res = await this.$api.user.getAdminList({
          ...query,
          current_page: 1,
          page_number: 10000
        })
        if (res.code === 1) {
          this.adminList = res.data.adminlist
          if (typeof callback === 'function') callback(res.data.adminlist)
        }
        this.adminLoading = false
      } catch (error) {
        this.adminLoading = false
      }
    }
  }
}
